package com.lck.blogmanager.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lck.blogmanager.common.Response;
import com.lck.blogmanager.entity.AuditEntity;
import com.lck.blogmanager.req.AuditPageReq;
import com.lck.blogmanager.res.AuditPageRes;
import com.lck.blogmanager.service.AuditService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 审核管理
 * @author wyq
 * @version v1.0.0
 * @explain
 * @date 2024/4/7 18:29
 */
@RequestMapping("/audit")
@RequiredArgsConstructor
@Slf4j
@RestController
@CrossOrigin
public class AuditController {

    private final AuditService auditService;

    /**
     * 管理端审核列表
     * @param req
     * @return
     */
    @PostMapping("/page")
    public Response<Page<AuditPageRes>> pageAudit(@RequestBody AuditPageReq req){
        Page<AuditPageRes> res = auditService.pageAudit(req);
        return Response.success(res);
    }

}
